﻿<UserControl x:Class="Telerik.Examples.WP.Chart.Dashboards.Amos"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:telerikChart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Chart"
    xmlns:telerikCharting="clr-namespace:Telerik.Charting;assembly=Telerik.Windows.Controls.Chart"
    xmlns:local="clr-namespace:Telerik.Examples.WP.Chart.Dashboards"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="600" d:DesignWidth="480">

    <UserControl.Resources>
        <ResourceDictionary x:Key="commonStyles">
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../CommonStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
        <SolidColorBrush x:Key="GrayBrush" Color="Gray"/>
        <SolidColorBrush x:Key="BooksBrush" Color="Green"/>
        <SolidColorBrush x:Key="MusicBrush" Color="Yellow"/>
        <SolidColorBrush x:Key="PetBrush" Color="Red"/>

    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" Background="{StaticResource PhoneChromeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="150"/>
            <RowDefinition Height="350"/>
            <RowDefinition Height="100"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        
        <Grid Grid.Row="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="50"/>
                <RowDefinition Height="25"/>
                <RowDefinition Height="25"/>
                <RowDefinition Height="25"/>
                <RowDefinition Height="25"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="50"></ColumnDefinition>
                <ColumnDefinition Width="70"></ColumnDefinition>
                <ColumnDefinition Width="410"></ColumnDefinition>
            </Grid.ColumnDefinitions>

            <TextBlock Text="Bug in 30 days" Grid.Row="0" Grid.ColumnSpan="3" Foreground="White" HorizontalAlignment="Center" FontSize="26" FontStretch="Expanded" VerticalAlignment="Center"></TextBlock>
            
            <Border Width="50" Height="20" Background="Red" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center"></Border>
            <TextBlock Text="Critical" Grid.Row="1" Grid.Column="2" Foreground="White"></TextBlock>
            <Border Width="50" Height="20" Background="Green" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center"></Border>
            <TextBlock Text="High" Grid.Row="2" Grid.Column="2" Foreground="White"></TextBlock>
            <Border Width="50" Height="20" Background="Yellow" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Center"></Border>
            <TextBlock Text="Middle" Grid.Row="3" Grid.Column="2" Foreground="White"></TextBlock>
            <Border Width="50" Height="20" Background="Gray" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Center"></Border>
            <TextBlock Text="Low" Grid.Row="4" Grid.Column="2" Foreground="White"></TextBlock>
        </Grid>
        
        
        <Grid Grid.Row="1">
        <telerikChart:RadCartesianChart Margin="0, 20, 0, 15" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" 
                                                        x:Name="aa">
            <telerikChart:RadCartesianChart.Grid>
                <telerikChart:CartesianChartGrid MajorLinesVisibility="Y" Style="{StaticResource gridStyleDashed}"/>
            </telerikChart:RadCartesianChart.Grid>

            <telerikChart:RadCartesianChart.HorizontalAxis>
                <telerikChart:CategoricalAxis Style="{StaticResource baseAxisStyle}"/>
            </telerikChart:RadCartesianChart.HorizontalAxis>
            <telerikChart:RadCartesianChart.VerticalAxis>
                <telerikChart:LinearAxis Style="{StaticResource linearAxisStyle}" 
                                                         Minimum="0" 
                                                         Maximum="200"
                                                         MajorStep="50"
                                                         LineStroke="Transparent"/>
            </telerikChart:RadCartesianChart.VerticalAxis>

            <telerikChart:BarSeries CombineMode="Stack">
                <telerikChart:BarSeries.PointTemplates>
                    <DataTemplate>
                        <Border Background="{StaticResource GrayBrush}" Name="item1"
                                                    BorderBrush="{StaticResource PhoneForegroundBrush}"
                                                    BorderThickness="2, 0, 2, 2"/>
                    </DataTemplate>
                </telerikChart:BarSeries.PointTemplates>
            </telerikChart:BarSeries>

            <telerikChart:BarSeries CombineMode="Stack">
                <telerikChart:BarSeries.PointTemplates>
                    <DataTemplate>
                        <Border Background="{StaticResource BooksBrush}" Name="item2"
                                                    BorderBrush="{StaticResource PhoneForegroundBrush}"
                                                    BorderThickness="2, 0, 2, 0"/>
                    </DataTemplate>
                </telerikChart:BarSeries.PointTemplates>
            </telerikChart:BarSeries>

            <telerikChart:BarSeries CombineMode="Stack">
                <telerikChart:BarSeries.PointTemplates>
                    <DataTemplate>
                        <Border Background="{StaticResource MusicBrush}" Name="item3"
                                                    BorderBrush="{StaticResource PhoneForegroundBrush}"
                                                    BorderThickness="2, 0, 2, 0"/>
                    </DataTemplate>
                </telerikChart:BarSeries.PointTemplates>
            </telerikChart:BarSeries>

            <telerikChart:BarSeries ClipToPlotArea="False" CombineMode="Stack">
                <telerikChart:BarSeries.PointTemplates>
                    <DataTemplate>
                        <Border Background="{StaticResource PetBrush}" Name="item4"
                                                    BorderBrush="{StaticResource PhoneForegroundBrush}"
                                                    BorderThickness="2, 2, 2, 0"/>
                    </DataTemplate>
                </telerikChart:BarSeries.PointTemplates>
            </telerikChart:BarSeries>

        </telerikChart:RadCartesianChart>
        </Grid>
    </Grid>
</UserControl>